package com.ark.cloud.javacallnative.modules.storage.service.impl;

import com.ark.cloud.javacallnative.entity.SensorOnOffEvent;
import com.ark.cloud.javacallnative.modules.storage.mapper.SensorOnOffEventMapper;
import com.ark.cloud.javacallnative.modules.storage.service.SensorOnOffEventService;
import com.ark.cloud.javacallnative.util.UUIDUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author fukun
 * @create 2021/9/1  下午3:25
 * @description
 */
@Service
public class SensorOnOffEventServiceImpl extends ServiceImpl<SensorOnOffEventMapper,SensorOnOffEvent> implements SensorOnOffEventService {

    @Autowired
    SensorOnOffEventMapper sensorOnOffEventDao;

    @Override
    public void saveSensorOnOffEventInfo(SensorOnOffEvent sensorOnOffEvent) {

        // 设置UUID
        sensorOnOffEvent.setId(UUIDUtil.next());

        System.out.println("sensorOnOffEvent:"+sensorOnOffEvent);
        sensorOnOffEventDao.saveSensorOnOffEventInfo(sensorOnOffEvent);

    }


}
